import random
print("""
⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐

欢迎来到猜数字游戏！
适当游戏益脑，沉迷游戏伤身，合理安排时间，享受健康生活

⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
""")
level=int(input("你想要什么难度（1星:1-100/3星:1-300/5星:1-500）："))
if level == 1:
    luckynum=random.randint(1,100)
    guess=int(input("请输入你猜的数字:"))
    while True:
        if guess == luckynum:
            print("恭喜你，猜对了！")
            break
        else:
            print("猜错了！")
            if guess>luckynum:
                guess = int(input("大了，请继续输入你猜的数字:"))
            else:
                guess = int(input("小了，请继续输入你猜的数字:"))
if level == 3:
                    luckynum = random.randint(1, 300)
                    guess = int(input("请输入你猜的数字:"))
                    while True:
                        if guess == luckynum:
                            print("恭喜你，猜对了！")
                            break
                        else:
                            print("猜错了！")
                            if guess > luckynum:
                                guess = int(input("大了，请继续输入你猜的数字:"))
                            else:
                                guess = int(input("小了，请继续输入你猜的数字:"))
if level == 5:
                    luckynum = random.randint(1, 500)
                    guess = int(input("请输入你猜的数字:"))
                    while True:
                        if guess == luckynum:
                            print("恭喜你，猜对了！")
                            break
                        else:
                            print("猜错了！")
                            if guess > luckynum:
                                guess = int(input("大了，请继续输入你猜的数字:"))
                            else:
                                guess = int(input("小了，请继续输入你猜的数字:"))